var frisby = require('frisby');

frisby.create('正确登录')
    .post('http://192.168.247.88:9090/hub/pilot/verify',{
        'device-udid':'092700B6-2E6F-45D7-B55D-AEFACED48DDC',
        'username':'ChoHeuiJe',
        'password':'adcc123'
      })
    // .inspectJSON()
    .expectJSON({
        'result':{
            "value":String,
      	    "name":String,
       		  "id":String,
      			"nodeID":String,
      			"account":String,
      			"sex":String,
      			"birthday":String,
      			"flag":String,
      			"ifFormal":String,
      			"nationality":String,
      			"nation":String,
      			"place":String,
      			"healthStatus":String,
      			"marriage":String,
      			"joinMemberCompanyDate":String,
      	    "info":String
          }})
  .toss()

frisby.create('非法用户')
    .post('http://192.168.247.88:9090/hub/pilot/verify',{
        'device-udid':'092700B6-2E6F-45D7-B55D-AEFACED48DDC',
        'username':'ChoHeuiJe',
        'password':'wrong password'
      })
    // .inspectJSON()
    .expectJSON({
        'result': {
          "value": 'error',
  				"info":'非法用户',
  				"name":'',
  				"nationality":'',
  				"id":''
        }})
.toss()

frisby.create('飞行员被禁用')
    .post('http://192.168.247.88:9090/hub/pilot/verify',{
        'device-udid':'092700B6-2E6F-45D7-B55D-AEFACED48DDC',
        'username':'ChoHeuiJe',
        'password':'wrong password'
      })
    // .inspectJSON()
    .expectJSON({
        'result': {
          "value": 'error',
  				"info":'飞行员被禁用',
  				"name":'',
  				"nationality":'',
  				"id":''
        }})
.toss()
